<template>
    <div>
        <el-breadcrumb separator-class="el-icon-arrow-right">
        <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item>商品管理</el-breadcrumb-item>
        <el-breadcrumb-item>修改商品</el-breadcrumb-item>
        </el-breadcrumb>

        <!-- 卡片视图区 -->
        <el-card>
            <!-- 提示区 -->
            <el-alert title="修改商品信息" type="info" center show-icon :closable="false">
            </el-alert>
            <product-Detail :proInfo="thisFormInfo" :showEdit="true"></product-Detail>
        </el-card>
    </div>
</template>

<script>
import _ from "lodash"
import productDetail from "./productDetail"
export default {
    data(){
        return {
            thisFormInfo : {},
            proId : "",
        }
    },
    created (){
        this.proId = this.$route.query.id;
        this.getProductInfo()
    },
    components:{
        'product-Detail':productDetail
    },
    computed: {
        
    },
    methods :{
        //根据id向后台发请求,获取此条数据
        getProductInfo(){
            //const prDdata = await this.$http.post("/info",{params:this.proId})
            this.thisFormInfo = {
                            "id" : 2,
                            "name" : "马",
                            "proType" : "玉,动物",
                            "prodetail" : "侯门有娇女，空欲窥颜色，譬彼琼树花，鲜艳自高立",
                            "size" : "2cm长",
                            "prosImg" : [],
                            "createDate" : "2018-5-13",
                            "remarks" : "11111",
                            "Piece" : 1,  //0~有货 1~无货可接受预定 2~无货 暂不可接受预定
                            "price" : 1000,
                            "dealType" : "",
                            "dealPrice" : 1000,
                            "buyerName" : "驴家家",
                            "address" : "龙华区33户",
                            "havedSold" : false
                            }
        }
    }
}
</script>

<style lang="less" scope>
</style>